<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>图书列表</title>
</head>
<body>
    <h1>图书列表</h1>
    <table width="500" border="1" cellspacing="0">
        <tr>
            <th>编号</th>
            <th>书名</th>
            <th>出版社</th>
            <th>价格</th>
            <th>零售价</th>
            <th>操作</th>
        </tr>
        {% for item in books %}
        <tr>
            <td>{{ item.id }}</td>
            <td>{{ item.title }}</td>
            <td>{{ item.pub }}</td>
            <td>{{ item.price }}</td>
            <td>{{ item.market_price }}</td>
            <td>
                <a href="http://127.0.0.1:8000/bookstore/update_book/{{ item.id }}">更新</a>
                |
                删除
            </td>
        </tr>
        {% endfor %}
    </table>
    <a href="/bookstore/add_book">新增图书</a>
</body>
</html>